/************************************************************************
 * @file ConsoleLogCommand.h
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#ifndef CONSOLELOGCOMMAND_H
#define CONSOLELOGCOMMAND_H

#include <plugin/command/AbstractLogCommand.h>

namespace antu
{
namespace plugin
{
/**
 * @brief Outputs log messages to console.
 */
class ConsoleLogCommand : public AbstractLogCommand
{
public:
    ConsoleLogCommand();

public:
    /**
     * @brief Allows initialization of logger.
     */
    virtual void init();

public:
    /**
     * @brief Log a debug message.
     * @param fileName Name of the source code file that generated the message.
     * @param line Line number within the file that generated the message.
     * @param className Class name of message generation.
     * @param methodName Method that generated the message.
     * @param message Content of the message.
     */
    virtual void debug(const QString& fileName, int line, const QString& className, const QString& methodName, const QString& message);

    /**
     * @brief Log an informative message.
     * @param fileName Name of the source code file that generated the message.
     * @param line Line number within the file that generated the message.
     * @param className Class name of message generation.
     * @param methodName Method that generated the message.
     * @param message Content of the message.
     */
    virtual void info(const QString& fileName, int line, const QString& className, const QString& methodName, const QString& message);

    /**
     * @brief Log a warning message.
     * @param fileName Name of the source code file that generated the message.
     * @param line Line number within the file that generated the message.
     * @param className Class name of message generation.
     * @param methodName Method that generated the message.
     * @param message Content of the message.
     */
    virtual void warn(const QString& fileName, int line, const QString& className, const QString& methodName, const QString& message);

    /**
     * @brief Log an error message.
     * @param fileName Name of the source code file that generated the message.
     * @param line Line number within the file that generated the message.
     * @param className Class name of message generation.
     * @param methodName Method that generated the message.
     * @param message Content of the message.
     */
    virtual void error(const QString& fileName, int line, const QString& className, const QString& methodName, const QString& message);

    /**
     * @brief Log a fatal message.
     * @param fileName Name of the source code file that generated the message.
     * @param line Line number within the file that generated the message.
     * @param className Class name of message generation.
     * @param methodName Method that generated the message.
     * @param message Content of the message.
     */
    virtual void fatal(const QString& fileName, int line, const QString& className, const QString& methodName, const QString& message);

    /**
     * @brief Sets the log level of the logger.
     * @param level Level of messge to log.
     */
    virtual void setLogLevel(LoggerService::LogType level);

private:
    LoggerService::LogType m_eLogType;
};
}
}

#endif // CONSOLELOGCOMMAND_H
